package top.laoshuzi.cloudplatform.tools;

import android.content.Context;
import android.content.SharedPreferences;

/**
 * Created by Mouse on 2016/12/5.
 */

public class PreferencesUtil {

    private static String SHATED_GLOBAL = "cloud_platform_global";

    private static SharedPreferences sharedGlobal;

    public static SharedPreferences getSharedGlobal(Context c) {
        if (sharedGlobal == null) {
            synchronized (PreferencesUtil.class) {
                if (sharedGlobal == null) {
                    sharedGlobal = c.getSharedPreferences(SHATED_GLOBAL, Context.MODE_PRIVATE);
                }
            }
        }
        return sharedGlobal;
    }
}
